<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Gdo_email 
{	
    public $CI;

    public function __construct()
    {
        $this->CI = &get_instance();
    }
  
    public function send_mail($content = array())
    {
        $this->CI->config->load('my_config', TRUE);
        $this->CI->load->library('email');
      
        $config = $this->CI->config->item('my_config');
     
        $message = $this->CI->load->view('template/confirm_registration_email', $content, TRUE);
      
        $this->CI->email->initialize(array('mailtype' => 'html'));
        $this->CI->email->from($config['email_sender'], $config['name_sender']);
        $this->CI->email->to($content['email']);
        $this->CI->email->subject($config['email_subject']);
        $this->CI->email->message($message);
        $this->CI->email->send();
    }
}